New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow space separated multiple items injection #1149
Conversation
Signed-off-by: DL6ER <dl6er@dl6er.de>
…ing CLI callbacks instead of working directly on the database. Signed-off-by: DL6ER <dl6er@dl6er.de>
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/restore-ability-to-add-blacklists-in-bulk/28091/20 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/batch-adlist-whitelist-updates/28556/9 |
Approved pending conflict resolution |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/restore-ability-to-add-blacklists-in-bulk/28091/37 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/managing-ad-lists-in-5-0/30088/8 |
Comma separated is a more natural delimiter for this kind of behaviour surely? This change breaks the ability to have group names with spaces in them.. |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/bug-creating-group-name-with-spaces-adds-more-than-one-group/32611/2 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/bulk-blacklist-whitelist/13556/4 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/adding-a-list-of-domains-to-white-blacklist-through-webgui/5686/10 |
By submitting this pull request, I confirm the following:
git rebase
)What does this PR aim to accomplish?:
Allow users to add multiple groups/clients/domains/adlists at once by space-separating them. All added items will receive the same comment (if specified).
Example 1
resulting in:
Example 2
resulting in:
Also, we remove the redundant list management from the settings page as this code was only partially migrated to the database backend (it was planed to be replace, anyway) and still uses CLI callbacks in the background. It is not needed any longer. I added a link to the new page so users will not be confused by a sudden absence of the settings tab.
How does this PR accomplish the above?:
Implement processing of space-separated items as individual entries.
What documentation changes (if any) are needed to support this PR?:
None